<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8"/>
    <title>徽虫争鸣</title>
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=0"/>
    <link rel="stylesheet" type="text/css" href="__STATIC__/css/wap/reset.css"/>
    <link rel="stylesheet" type="text/css" href="__STATIC__/css/wap/common.css"/>
    <link rel="stylesheet" type="text/css" href="__STATIC__/css/wap/login.css"/>
</head>

<body>
<div class="mainWrap">
    <div class="header">
        <!--<a class="turnBackBtn" href="window.history.back(-1)"><img src="img/icon_turnBack.png" /></a>-->
        <h3>登录</h3>
    </div>

    <div class="loginWrap">
        <form method="post" class="formbox" id="formbox">
            <div class="inputbox">
                <label for="username" class=""><img src="__STATIC__/images/icon_user.png" alt="用户"></label>
                <input id="username" name="username" placeholder="请输入用户名"/>
            </div>
            <div class="inputbox">
                <label for="password"><img src="__STATIC__/images/icon_lock.png" alt="密码"></label>
                <input id="password" name="password" type="password" placeholder="请输入密码"/>
            </div>
            <div class="inputbox verfctCodeWrap">
                <div class="verfctInput">
                    <label for="verifyCode"><img src="__STATIC__/images/icon_verify.png" alt="验证码"></label>
                    <input id="verifyCode" name="verify" placeholder="验证码"/>
                </div>
                <a href="javascript:void(0);" class="verfctCode">
                    <img id="img" onclick="this.src = '{:captcha_src()}?a=' + new Date()" src="{:captcha_src()}">
                </a>
            </div>

            <div>
                <label style="font-size: 16px;" class="errordata"></label>
                <button type="button" onclick="mysubmit();" class="loginBtn">登录</button>
            </div>
        </form>
    </div>
</div>
</body>
<script src="__ROOT__/lib/rem.js" type="text/javascript"></script>
<script src="__ROOT__/lib/jquery/1.9.1/jquery.min.js" type="text/javascript"></script>

<script src="__STATIC__/h-ui/js/H-ui.js" type="text/javascript"></script>

<script type="text/javascript">

    function mysubmit() {
        $("#formbox").ajaxSubmit({
            type: 'post',
            url: '{:url("auth/logindo")}',
            success:function (data) {
                if (data.status==0){
                    $(".errordata").text(data.error);
                    $("#img").attr('src','{:captcha_src()}?a=' + new Date());
                }else{
                    window.location.href="{:url('wap/index')}";
                }
            }
        })
    }
</script>

</html>